<template>
	<view class="yueRecord">
		<view class="top">
			当前余额:<text>135.00</text>  元
		</view>
		<view class="ul">
			<block v-for="(item,index) in 10" :key="index">
				<view class="li flex-between">
					<view class="left">
						<view class="name">信息费*2</view>
						<view class="date">2020-04-20 18:50</view>
					</view>
					<view class="right">
						<text>-6</text>元
					</view>
				</view>
			</block>
			
		</view>
		<view class="tip flex-center">
			<text>暂无更多</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				hasMore:true,
				now_page:1
			};
		},
		onLoad() {
			this.getList()
		},
		methods:{
			getList(){
				this.$https.get('balance/index',{
					page:this.now_page,
					page_size:15
				}).then(res=>{
					this.list = this.list.concat(res.list)
					this.hasMore = res.has_more
				})
			}
		},
		onReachBottom() {
			if(this.hasMore){
				this.now_page++
				this.getList()
			}
		}
	}
</script>

<style lang="less">
	page{
		background: #f2f3f4;
	}
	.yueRecord{
		.top{
			line-height: 3;
			text-align: center;
			font-size: 30rpx;
			text{
				font-size: 50rpx;
				font-weight: bold;
				margin: 0 10rpx;
			}
		}
		.ul{
			background: white;
			
			.li{
				border-bottom: 1px solid #eee;
				padding: 24rpx;
				.name{
					font-size: 32rpx;
					margin-bottom: 30rpx;
				}
				.date{
					font-size: 24rpx;
					color:#999;
				}
				.right{
					font-size: 28rpx;
					text{
						font-size: 40rpx;
					}
				}
			}
		}
		.tip{
			height: 100rpx;
			font-size: 26rpx;
			color:#999;
		}
	}
</style>
